// pages/login/login.js
Page({
  /**
   * 页面的初始数据
   */
  data: {},
  // 登录
  login() {
    wx.request({
      url: 'http://120.78.172.212:9001/api/wx/login',
      data: {
        phone: '13696840522',
      },
      method: 'POST',
      success: (result) => {
        console.log(result)
        if (result.data.code !== 200) {
          return
        }
        wx.setStorage({
          key: 'token',
          data: result.data.data,
        })
        wx.switchTab({
          url: '../../pages/index/index'
        })
          
      },
    })
  },
})
